<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>GroundedSkybox - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Mesh.html">Mesh</a> → </p>
	<h1 translate="no">GroundedSkybox</h1>
		<section>
			<header>
				<div class="class-description"><p>A ground-projected skybox.</p>
<p>By default the object is centered at the camera, so it is often helpful to set
<code>skybox.position.y = height</code> to put the ground at the origin.</p></div>
				<h2>Code Example</h2>
				<div translate="no"><pre><code class="language-js">const height = 15, radius = 100;
const skybox = new GroundedSkybox( envMap, height, radius );
skybox.position.y = height;
scene.add( skybox );
</code></pre></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">GroundedSkybox</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { GroundedSkybox } from 'three/addons/objects/GroundedSkybox.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="GroundedSkybox" translate="no">new <a href="#GroundedSkybox">GroundedSkybox</a><span class="signature">( map : <span class="param-type"><a href="Texture.html">Texture</a></span>, height : <span class="param-type">number</span>, radius : <span class="param-type">number</span>, resolution : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new ground-projected skybox.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>map</strong>
									</td>
									<td class="description last">
										<p>The environment map to use.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>height</strong>
									</td>
									<td class="description last">
										<p>The height is how far the camera that took the photo was above the ground.
A larger value will magnify the downward part of the image.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>radius</strong>
									</td>
									<td class="description last">
										<p>The radius of the skybox. Must be large enough to ensure the scene's camera stays inside.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>resolution</strong>
									</td>
									<td class="description last">
										<p>The geometry resolution of the skybox.</p>
										<p>Default is <code>128</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/GroundedSkybox.js" translate="no" target="_blank" rel="noopener">examples/jsm/objects/GroundedSkybox.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>